﻿namespace Huioo.Learning.Agile.Payroll.Domain
{
    public interface PaymentClassification
    {
        double CalculatePay(Paycheck paycheck);

        public bool IsInPayPeriod(DateTime theDate, Paycheck paycheck)
        {
            DateTime payPeriodEndDate = paycheck.PayPeriodEndDate;
            DateTime payPeriodStartDate = paycheck.PayPeriodStartDate;
            return (theDate >= payPeriodStartDate)
              && (theDate <= payPeriodEndDate);
        }

    }
}